home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / XML Utilities / Professional Programmer XSL IDE / Xselerator25.msi / Data.Cab / F22882_DocumentAsAttributeXML.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2001-10-04  |  1.0 KB  |  27 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- ===========================================================
  3.   Category:       MultipleDataSources
  4.   Sub-category:   XML
  5.   Author:         David Silverlight
  6.                   HeadGeek@xmlpitstop.com
  7.   Created:        2001-05-16
  8.   Description:-
  9.     This stylsheet demonstrates how to combine multiple XML
  10.     documents into a single data source.  In this example, the
  11.     name of the xml document is stored as an attribute value.
  12.     The document() function is used in the stylesheet to create
  13.     an instance of each xml document.  The end result of the
  14.     transformation is a combination of all of the input XML
  15.     documents into a single XML document.
  16. ================================================================ -->
  17. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  18.  
  19. <xsl:template match="ProductFiles">
  20.   <allproducts>
  21.   <xsl:for-each select="document(file/@href)">
  22.     <xsl:copy-of select="*" />
  23.   </xsl:for-each>
  24.   </allproducts>
  25. </xsl:template>
  26.  
  27. </xsl:stylesheet>